<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/template/common/header.jsp"%>
<div class="pageContent"
	style="border-left: 1px #B8D0D6 solid; border-right: 1px #B8D0D6 solid">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add"
				href="${base }/category!add.action?&category.id=${category.id}"
				target="dialog" title="添加子类" mask="true"><span>添加子类</span></a></li>
			<c:if test="${not empty category.id or category.id eq 'root'}">
				<li><a class="edit"
					href="${base }/category!taskAdd.action?&category.id=${category.id}"
					target="ajaxTodo" title="更新分类" mask="true"><span>更新分类</span></a></li>
			</c:if>
			<c:if test="${not empty category.id and category.id eq 'root'}">
				<li><a class="add" href="${base }/category!seedFile.action"
					target="dialog" title="导入种子URL" mask="true"><span>导入种子URL</span></a></li>
			</c:if>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="130">
		<thead>
			<tr>
				<th width="100">标题</th>
				<th width="70">创建日期</th>
				<th width="30">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="category" items="${categories}">
				<tr target="category" rel="${category.id}">
					<td>${category.title}</td>
					<td><fmt:formatDate value="${category.createDate }"
							pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><a title="修改" rel="category_edit" target="dialog"
						href="${base }/category!edit.action?category.id=${category.id}"
						class="btnEdit">修改</a> <a title="确认删除此分类?" target="ajaxTodo"
						href="${base }/category!delete.action?category.id=${category.id}"
						class="btnDel">修改</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<form action="${base }/category!list.action" id="searchForm"
		rel="pagerForm" method="post">
		<input type="hidden" name="category.id" value="${category.id}" />
	</form>
	<cy:pagination pageBean="${pager }"
		pageUrl="${base }/category!list.action" pageRel="cagegory-list-box">
		<%@include file="/WEB-INF/template/common/pagination.jsp"%>
	</cy:pagination>
</div>